{% extends "base.html" %}

{% block title %}OpenAPI Swagger UI{% endblock %}

{% block head %}
  <link rel="stylesheet" href="swagger/swagger-ui.css">
  <script src="swagger/swagger-ui-bundle.js"></script>
  <script>
    function render() {
      api_url = './openapi.yaml';
      var ui = SwaggerUIBundle({
        url:  api_url,
        dom_id: '#swagger-ui',
        presets: [
          SwaggerUIBundle.presets.apis,
          SwaggerUIBundle.SwaggerUIStandalonePreset
        ]
      });
    }
  </script>
{% endblock %}

{% block onload %}render(){% endblock %}

{% block content %}
  <div id="swagger-ui"></div>
{% endblock %}
